/**
* Copyright 2009 Waag Society <http://www.waag.org>
* This file is part of Annotrax.
*
* Annotrax is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Annotrax is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Annotrax.
* If not, see http://www.gnu.org/licenses/gpl.html
*/

self.TimeViewer = function(container)
{
	this.el_main = Element("div",{className:"time_viewer"},container)
	this.el_time1 = Element("div",{className:"time_in_movie"},this.el_main)
	this.el_time2 = Element("div",{className:"time_in_fragment"},this.el_main)
	
	$(document).bind("player_progress",bind(this,"onPlayerProgress"))
}
TimeViewer.prototype.onPlayerProgress = function(evt,playlist_item,time_in_movie,time_in_fragment)
{
	$(this.el_time1).html(AnnotraxTime.secondsToTimeString(time_in_movie))
	$(this.el_time2).html(AnnotraxTime.secondsToTimeString(time_in_fragment))
}
